﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Assignment4.Linklist
{
    public  class Test
    {
        public static  void  Main()
        {
            GenericList<int> list = new GenericList<int>();
            for (int i = 0; i < 10; i++)
                list.Add(i);

            int maxVal = int.MaxValue;
            int minVal = int.MinValue;
            int sum = 0;
            list.ForEach(d => maxVal = Math.Max(maxVal, d));
            list.ForEach(d => minVal = Math.Max(minVal, d));
            list.ForEach(d => sum += d);
            Console.WriteLine($"max={maxVal},min={minVal},sum={sum}");


        }
    }
}
